<template>
  <button type="button" @click="$emit('update:count',count+1)">更改data</button>
  <p>我是父页面传递过来的v-model数据：{{count}}</p>
</template>

<script lang="ts">
import { ref, defineComponent } from 'vue'
export default defineComponent({
  name: 'Test',
  props:['count'],
  setup(){
  }
})

</script>

<style scoped>
a {
  color: #42b983;
}

label {
  margin: 0 0.5em;
  font-weight: bold;
}

code {
  background-color: #eee;
  padding: 2px 4px;
  border-radius: 4px;
  color: #304455;
}
</style>
